binary is not sufficient, because the user may not have the appropriate
modules installed.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
#
function handle_iptable()
{
- if ! which iptables >&/dev/null
+ # Check for a working iptables installation. Checking for the iptables
+ # binary is not sufficient, because the user may not have the appropriate
+ # modules installed. If iptables is not working, then there's no need to do
+ # anything with it, so we can just return.
+ if ! iptables -L >&/dev/null
then
return
fi